#include "Monster.h"
#include "FileHelper.h"

bool Monster::init() {
	if (!Node::init()) {
		return false;
	}
	this->monsterId = 11;
	this->cur_blood = 10;
	this->max_blood = 10;
	this->skill_att = new std::map < std::string, int>();
	this->skill_att->insert(std::pair<std::string, int>("attack1", 100));
	this->skill_att->insert(std::pair<std::string, int>("attack2", 150));
	this->skill_num = new std::map < std::string, int>();
	this->skill_num->insert(std::pair<std::string, int>("attack1", 10));
	this->skill_num->insert(std::pair<std::string, int>("attack2", 15));

	FileHelper::SaveMonster("./script/Monster1.lua", this);

	FileHelper::GetMonster("./script/Monster1.lua", this);
	log("%d", this->monsterId);

	return true;
}
